import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/fonts/iconfont.css'
import './assets/css/reset.css'
import { Tabbar, TabbarItem, Icon, Swipe, SwipeItem, Grid, GridItem, PullRefresh, List, NavBar, GoodsAction, GoodsActionIcon, GoodsActionButton, Popup, Card, Stepper, Button, Form, Field, Checkbox, CheckboxGroup, SwipeCell, SubmitBar, AddressEdit, AddressList, ContactCard, Search, Lazyload } from 'vant'

import loading from 'plugins/loading'
import img from './assets/img/loading.gif'
// const loadingImg = require('./assets/img/loading.gif')
// require图片懒加载方法
Vue.use(loading)

Vue.use(Tabbar)
  .use(TabbarItem)
  .use(Icon)
  .use(Swipe)
  .use(SwipeItem)
  .use(Grid)
  .use(GridItem)
  .use(PullRefresh)
  .use(List)
  .use(NavBar)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Popup)
  .use(Card)
  .use(Stepper)
  .use(Button)
  .use(Form)
  .use(Field)
  .use(Checkbox)
  .use(CheckboxGroup)
  .use(SwipeCell)
  .use(SubmitBar)
  .use(AddressEdit)
  .use(AddressList)
  .use(ContactCard)
  .use(Search)
  .use(Lazyload, {
    loading: img,
    error: '',
    preload: '1'
  })
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
